Release 10.1A: OpenEdge Development:
Programming Interfaces
Retrieving and storing pointers
In some cases (especially for shared library routines), you might have to obtain a pointer to the memory region associated with a
MEMPTRvariable. You might need this value, for example, to build a structure that contains a pointer to another structure. You can get a pointer to aMEMPTRregion by using theGET-POINTER-VALUEfunction. This is the syntax for theGET-POINTER-VALUEfunction:
For example, to retrieve the pointer to a memory region specified by a
MEMPTRvariable (BitMapInfo) and store it in the first byte position of anotherMEMPTRvariable (BitMaps), you can use the following statement (assuming 32-bit pointers):
You can also store the address of a memory item into a
MEMPTRvariable by using theSET-POINTER-VALUEstatement. Here is the syntax:
For example, to store an address located at the second byte of a
MEMPTRvariable (BitMaps) into anotherMEMPTRvariable (BitMapInfo), you can use the following statement:
For more information on the
GET-POINTER-VALUEfunction and theSET-POINTER-VALUEstatement, see the OpenEdge Development: Progress 4GL Reference .
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |